package com.isoftstone.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.isoftstone.dao.EducateDAO;
import com.isoftstone.pojo.Educate;
import com.isoftstone.service.EducateService;

@Service
public class EducateServiceImpl implements EducateService {

	@Autowired
	private EducateDAO educateDAO;
	
	@Override
	public int register(Educate educate) {
		System.out.println("注册用户");
		return educateDAO.insert(educate);
	}

	@Override
	public List<Educate> getSummary() {
		return educateDAO.selectSummary();
	}
	
	@Override
	public List<Educate> getPlan() {
		return educateDAO.selectPlan();
	}
	//详细
	@Override
	public Educate detailPlaneducate(int id) {
		//System.out.println("detaileducate执行，调用DAO");
		//System.out.println(id);
		return educateDAO.selectPlanEducate(id);
	}
	
	@Override
	public int modifyeducate(int id) {
		return educateDAO.deleteEducate(id);
	}
	

	@Override
	public int updateeducate(Educate educate) {
		return educateDAO.updateeducate(educate);
	}

	@Override
	public Educate detailSummaryeducate(int id) {
		// TODO Auto-generated method stub
		return educateDAO.selectSummaryEducate(id);
	}


}
